#ifndef CONTACTLISTVIEW_H
#define CONTACTLISTVIEW_H

#include <QListView>

#include <messaginglayer/contactinfo.h>

#include "contactdelegate.h"

class ContactListView : public QListView
{
    Q_OBJECT
public:
    explicit ContactListView(QWidget *parent = 0);

    ContactDelegate::DisplayMode displayMode() const;
    void setDisplayMode(ContactDelegate::DisplayMode mode);

signals:
    void messagingRequest(const ContactInfo &cinfo);

private slots:
    void contactActivated(const QModelIndex &index);

private:
    ContactDelegate * m_contactDelegate;

};

#endif // CONTACTLISTVIEW_H
